﻿using Abp.Events.Bus;

namespace AbpProjectTemplate.Components.Events.Entities
{
    /// <summary>
    /// 实体Id检测事件
    /// </summary>
    public class EntityIdCheckEventData<TEntity, TKey> : EventData
    {
        public TKey Id { get; set; }

        public string ErrorMessage { get; set; }

        public EntityIdCheckEventData(TKey id, string errorMessage = null)
        {
            this.Id = id;
            this.ErrorMessage = errorMessage;
        }
    }
    /// <summary>
    /// 实体Id检测事件
    /// </summary>
    public class EntityIdCheckEventData<TEntity> : EntityIdCheckEventData<TEntity, int>
    {
        public EntityIdCheckEventData(int id, string errorMessage = null)
            : base(id, errorMessage)
        {

        }
    }
}
